Skip to main content

Getting Started

The platform is made available as a Maven Dependency for its users. The article below details the steps required to include the same in a new project.


Cloning the RASP-Platform Repository

The rasp-platform dependency is not available in a public repository. To satisfy this dependency, you need to clone the RASP-Platform GitHub repository and run mvn install inside the cloned directory. This will install the dependency into your local Maven repository, making it available for your project.

Here is the link to the repo : https://github.com/IIITBangalore/RASP-Platform/tree/v0.1

Before running maven install, we need to set MongoDB as our application database as it is the one we will be using in this tutorial. To do so, navigate to src/main/java/platform/manager/GlobalDataManager.java in the RASP-Platform repository and change the DEFAULT_DB_TYPE to DBConstants.DB_TYPE_MONGODB on line 22.

DB Type


Using the platform in your project

The platform is based on the Spring framework, so we need a suitable starting point for the project. We can use spring initializr for this purpose :

  • Maven should be chosen as the build tool and Java version 21 should be picked as the language.
  • The project metadata should be filled in as per the requirements.
  • For the time being, any version of Spring Boot will do as it will be changed later on to a version in the 3.x.x series.
  • As of now, adding the following dependencies should be enough : - Spring Web - Spring Boot Actuator We will be adding/updating dependencies with specific versions later. Download and unzip the generated project to obtain the desired starting point.

Adding rasp-platform as a dependency

We shall make the following changes to pom.xml so that we can utilise the platform.

1. Using the correct version of the Spring Framework

The parent tag should be modified to look as follows :

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.1</version>
</parent>
2. Using the correct properties

The following properties should be added to the application :

<properties>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<elasticsearch.version>7.17.6</elasticsearch.version> <!-- Upgraded to the latest compatible version -->
<jackson.version>2.14.0</jackson.version> <!-- Upgraded to the latest version -->
<log4j-version>2.20.0</log4j-version> <!-- Upgraded to the latest version -->
<kafka.version>3.4.0</kafka.version> <!-- Upgraded to the latest version -->
<activemq.version>5.7.0</activemq.version> <!-- Upgraded to the latest version -->
<poi.version>5.2.5</poi.version> <!-- Upgraded to the latest version -->
<httpclient.version>4.5</httpclient.version> <!-- Upgraded to the latest version -->
<hbase.version>2.5.4</hbase.version> <!-- Upgraded to the latest version -->
<neo4j.version>5.8.0</neo4j.version> <!-- Upgraded to the latest version -->
<github.global.server>github</github.global.server>
<start-class>platform.editor.application.EditorApplication</start-class>
<rasp-platform.version>1.0.0-SNAPSHOT</rasp-platform.version>
</properties>
3. Adding the correct dependencies

The following dependencies should be added to the <dependencies/> tag :

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>rasp-platform</groupId>
<artifactId>rasp-platform</artifactId>
<version>${rasp-platform.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version> 2.0.2</version>
</dependency>
</dependencies>

Here, we have added Spring web so that we can create our RESTful application, rasp-platform to help us with code generation and writing low-code implementations of other features and swagger2 to generate and display the Swagger API documentation.


Upon completion of the above steps, the rasp-platform dependency can be used in the project. To verify that the dependency has been successfully installed, try importing the platform in the application and check for any import errors.